package com.jqq.spring.controller;

import com.jqq.spring.service.BookService;
import com.jqq.spring.service.CheckoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @author 姬倩倩
 * @date 2023-05-19
 */
@Controller
public class BookController {

    @Autowired
    private BookService bookService;
    @Autowired
    private CheckoutService checkoutService;

    public void buyBook(Integer userId, Integer bookId){

        bookService.buyBook(userId, bookId);
    }
    public void checkout(Integer userId, Integer[] bookIds){
        checkoutService.checkout(userId,bookIds);
    }
}
